//读取cookie
	function readCookie(name){
		var arr,reg=new RegExp("(^| )"+name+"=([^;]*)(;|$)");
		if(arr=document.cookie.match(reg)){
			return unescape(arr[2]);
		}else{
			return null;
		}
	}
//JS操作cookies方法!
//写cookies
	function setCookie(name,value){
//		var exp = new Date();
// 		exp.setTime(exp.getTime() + 10*60*1000);
 		var Days = 7;
 		var exp = new Date();
 		exp.setTime(exp.getTime() + Days*24*60*60*1000);
		document.cookie = name + "="+ escape(value) + ";expires="+exp.toGMTString();
	} 
	
	//删除cookie
	function delCookie(name){
		var paramAccountId = $("#paramAccountId").val();
	    var cookieName = paramAccountId+name;
		var exp = new Date();
		exp.setTime(exp.getTime() - 1);
		var cval=readCookie(cookieName);
		if(cval!=null)
		document.cookie= cookieName + "="+cval+";expires="+exp.toGMTString();
	}
	function setGuideCookie(){
		var paramAccountId = $("#paramAccountId").val();
		var guideCookie = $("#guideCookie").val();
	    var cookieName = paramAccountId+guideCookie;
		setCookie(cookieName,guideCookie);
		hideGuideM();
	}
	
//	未实名
	function open_noName(){
		var paramAccountId = $("#paramAccountId").val();
		var cookieName = paramAccountId+"_open_noName";
	    var cookieValue = readCookie(cookieName);
	    if(cookieValue=="_open_noName"){
	    	$(".zhy_guide_tip").html("");
			hideGuideM('zhy_popa_guidea');
	    }else{
    		$.ajax({   
    	        type: "POST",  
    	        dataType: "html",  
    	        url: '../module/open_noName',  //提交到一般处理程序请求数据  
    	        data: {},                
    	        async: true,
    	        success: function(data) { 
    	        	$("#open_notName_jsp").empty().html(data);
    				var html='<div class="zhy_guide_content">'+
    							'<img src="https://res.sankai.com/st/zhcloud_v1/img/zhy_guide_tip.png" />'+
    							'<a href="javascript:setGuideCookie();">我知道了</a>'+
    						  '</div>';
    				$(".zhy_guide_tip").html(html);
    				showPopGuide('zhy_popa_guidea');
    	        }
    		});
	    }
	}
    		
//	未实名
	function open_noName_t(){
		$.ajax({   
	        type: "POST",  
	        dataType: "html",  
	        url: '../module/open_noName',  //提交到一般处理程序请求数据  
	        data: {},                
	        async: true,
	        success: function(data) { 
				$("#open_notName_jsp").empty().html(data);
				var paramAccountId = $("#paramAccountId").val();
				var cookieName = paramAccountId+"_open_noName";
			    var cookieValue = readCookie(cookieName);
				if(cookieValue=="_open_noName"){
					$(".zhy_guide_tip").html("");
					$("#open_notName_jsp .close_icon").attr("onclick",'hideGuide2()');
					$(".guide_block").find("a").each(function(){
						$(this).attr("onclick","hideGuideM()");
					})
				}
				showPopGuide('zhy_popa_guidea');
	        }  
	    });
	}
//	地产
	function dichan(){
		 var paramAccountId = $("#paramAccountId").val();
		 var cookieName = paramAccountId+"_open_dichan";
	     var cookieValue = readCookie(cookieName);
		 if(cookieValue=="_open_dichan"){
			$(".zhy_guide_tip").html("");
			hideGuideM('zhy_popa_guideb');
		 }else{
			$.ajax({   
		        type: "POST",  
		        dataType: "html",  
		        url: '../module/open_dichan',  //提交到一般处理程序请求数据  
		        data: {},                
		        async: true,
		        success: function(data) { 
		        	$("#open_dichan_jsp").empty().html(data);
					var html='<div class="zhy_guide_content">'+
								'<img src="https://res.sankai.com/st/zhcloud_v1/img/zhy_guide_tip.png" />'+
								'<a href="javascript:setGuideCookie();">我知道了</a>'+
							  '</div>';
					$(".zhy_guide_tip").html(html);
					showPopGuide('zhy_popa_guideb');
		        }  
		    });
		}
	}
//	地产
	function dichan_t(){
		$.ajax({   
	        type: "POST",  
	        dataType: "html",  
	        url: '../module/open_dichan',  //提交到一般处理程序请求数据  
	        data: {},                
	        async: true,
	        success: function(data) { 
				$("#open_dichan_jsp").empty().html(data);
				var paramAccountId = $("#paramAccountId").val();
			    var cookieName = paramAccountId+"_open_dichan";
			    var cookieValue = readCookie(cookieName);
				if(cookieValue=="_open_dichan"){
					$(".zhy_guide_tip").html("");
					$("#open_dichan_jsp .close_icon").attr("onclick",'hideGuide2()');
					$(".guide_block").find("a").each(function(){
						$(this).attr("onclick","hideGuideM()");
					})
				}
				showPopGuide('zhy_popa_guideb');
	        }  
	    });    
	}
//	机构
	function jigou(){
		var paramAccountId = $("#paramAccountId").val();
		var cookieName = paramAccountId+"_open_jigou";
	    var cookieValue = readCookie(cookieName);
		if(cookieValue=="_open_jigou"){
			$(".zhy_guide_tip").html("");
			hideGuideM('zhy_popa_guided');
		}else{
			$.ajax({   
		        type: "POST",  
		        dataType: "html",  
		        url: '../module/open_jigou',  //提交到一般处理程序请求数据  
		        data: {},                
		        async: true,
		        success: function(data) { 
					$("#open_jigou_jsp").empty().html(data);
					var html='<div class="zhy_guide_content">'+
								'<img src="https://res.sankai.com/st/zhcloud_v1/img/zhy_guide_tip.png" />'+
								'<a href="javascript:setGuideCookie();">我知道了</a>'+
							  '</div>';
					$(".zhy_guide_tip").html(html);
					showPopGuide('zhy_popa_guided');
		        }  
		    });    	 
		}
	}
//	机构
	function jigou_t(){
		$.ajax({   
	        type: "POST",  
	        dataType: "html",  
	        url: '../module/open_jigou',//提交到一般处理程序请求数据  
	        data: {},                
	        async: true,
	        success: function(data) { 
				$("#open_jigou_jsp").empty().html(data);
				var paramAccountId = $("#paramAccountId").val();
			    var cookieName = paramAccountId+"_open_jigou";
			    var cookieValue = readCookie(cookieName);
				if(cookieValue=="_open_jigou"){
					$(".zhy_guide_tip").html("");
					$("#open_jigou_jsp .close_icon").attr("onclick",'hideGuide2()');
					$(".guide_block").find("a").each(function(){
						$(this).attr("onclick","hideGuideM()");
					})
					
				}
				showPopGuide('zhy_popa_guided');
	        }  
	    });    	 
	}

	
	//居家
	function jujia(){
		var paramAccountId = $("#paramAccountId").val();
		var cookieName = paramAccountId+"_open_jujia";
	    var cookieValue = readCookie(cookieName);
		if(cookieValue=="_open_jujia"){
			$(".zhy_guide_tip").html("");
			hideGuideM('zhy_popa_guidec');
		}else{
			$.ajax({   
		        type: "POST",  
		        dataType: "html",  
		        url: '../module/open_jujia',  //提交到一般处理程序请求数据  
		        data: {},                
		        async: true,
		        success: function(data) { 
		        	$("#open_jujia_jsp").empty().html(data);
					var html='<div class="zhy_guide_content">'+
								'<img src="https://res.sankai.com/st/zhcloud_v1/img/zhy_guide_tip.png" />'+
								'<a href="javascript:setGuideCookie();">我知道了</a>'+
							  '</div>';
					$(".zhy_guide_tip").html(html);
					showPopGuide('zhy_popa_guidec');
		        }  
		    });    	 
		}
	}
	
	
	//居家
	function jujia_t(){
		$.ajax({   
	        type: "POST",  
	        dataType: "html",  
	        url: '../module/open_jujia',  //提交到一般处理程序请求数据  
	        data: {},                
	        async: true,
	        success: function(data) { 
	        	$("#open_jujia_jsp").empty().html(data);
				var paramAccountId = $("#paramAccountId").val();
			    var cookieName = paramAccountId+"_open_jujia";
			    var cookieValue = readCookie(cookieName);
				if(cookieValue=="_open_jujia"){
					$(".zhy_guide_tip").html("");
					$("#open_jujia_jsp .close_icon").attr("onclick",'hideGuide2()');
					$(".guide_block").find("a").each(function(){
						$(this).attr("onclick","hideGuideM()");
					})
				}
				showPopGuide('zhy_popa_guidec');
	        }  
	    });    	 
	}
	

